<!doctype html>
<html><!-- InstanceBegin template="/Templates/enter.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0"/>
    <meta name="renderer" content="webkit">
    <!-- InstanceBeginEditable name="doctitle" -->
    <title>NT ERP</title>
    <!-- InstanceEndEditable -->
    <meta name="keywords" content=""/>
    <meta name="description" content=""/>
    <style>
        body {
            background: #f0f0f0 !important;
        }

        a {
            text-decoration: none !important
        }

        .head {
            position: fixed;
            top: 0;
        }

        .silde {
            height: 850px !important;
            overflow: auto !important;
            width: 100% !important;
            margin-top: 50px;
        }

        .menu-left {
            width: calc(100% - 200px) !important;
        }

        .mLeft {
            height: 100%;
            position: fixed;
            top: 50px;
        }

        .headbox {
            position: fixed;
            top: 0;
            z-index: 999;
            width: 100%;
            background: #000;
        }

        #menu-trigger span {
            color: #fff;
        }

        .langsctive {
            background: #337ab7;
            color: #fff !important;
        }

        .langsctive:hover {
            color: #000 !important;
        }
        [v-cloak] {
            display: none;
        }
    </style>

    <script src="/static/Admin/js/jquery.min.js"></script>
    <script src="/static/Admin/js/jquery-ui.min.js"></script>
    <script src="/static/Admin/js/bootstrap.js"></script>
    <!-- <script src="/static/Admin/js/jqPaginator.min.js"></script> -->
    <script src="/static/Admin/js/jqPaginator.js"></script>
    <script src="/static/Admin/js/display.js"></script>
    <!--日期插件的使用-->
    <script language="javascript" src="/static/Admin/datetimepicker/bootstrap-datetimepicker.min.js"></script>
    <script language="javascript" src="/static/Admin/datetimepicker/locales/bootstrap-datetimepicker.zh-CN.js"></script>
    <script language="javascript" src="/static/Admin/datetimepicker/locales/bootstrap-datetimepicker.pt-BR.js"></script>
    <link href="/static/Admin/css/bootstrap-datetimepicker.min.css" rel="stylesheet">
    <!--结束-->

    <link rel="stylesheet" href="/static/Admin/css/toastr.css">
    <script src="/static/Admin/js/toastr.min.js"></script>
    <script src="/static/Admin/js/vue.js"></script>
    <script type="text/javascript">
        var zh={
            page_home:'首页',
            previous_page:'上一页',
            next_page:'下一页',
            last_page:'末页',
            please_select:'请选择'
        }
        var en={
            page_home:'page home',
            previous_page:'previous page',
            next_page:'next page',
            last_page:'last page',
            please_select:'please select'
        }
        var pt={
            page_home:'página principal',
            previous_page:'página anterior',
            next_page:'página próxima',
            last_page:'última página',
            please_select:'selecione'
        }
        var langcon={}
        jQuery(function () {
            $('#menu-trigger').click(function () {
                if (!$('.mLeft').hasClass('show-menu-left')) {
                    $('.silde, .footer').addClass('menu-left');
                    $('.mLeft').addClass('show-menu-left');
                } else {
                    $('.mLeft').removeClass('show-menu-left');
                    $('.silde, .footer').removeClass('menu-left');
                }
            });


            function closeAllMenu() {
                $('.sub-menu').each(function () {
                    $(this).hide();
                });
                $('.first-menu').each(function () {
                    $(this).removeClass('active');
                });
            }

            closeAllMenu();
            var pid = $('.pid').val()
            var did = $('.did').val()
            $('a[data-navpid=' + pid + ']').addClass('active')
            $('a[data-navpid=' + pid + ']').parent().find('ul').css('display', 'block')
            $('a[data-navid=' + did + ']').css('background', '#526076')

            $('.first-menu').click(function () {
                closeAllMenu();
                $(this).addClass('active');
                $(this).parent("li").find('.sub-menu').toggle();
            });

        });
    </script>
    <link href="/static/Admin/css/bootstrap.min.css" rel="stylesheet">
    <link rel="stylesheet" href="/static/Admin/css/fontawesome.min.css">
    <link href="/static/Admin/css/default.css" rel="stylesheet">
    <link href="/static/Admin/css/ntStyle.css" rel="stylesheet">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <!-- InstanceBeginEditable name="head" -->
    <!-- InstanceEndEditable -->
</head>

<body>
<div class="headbox">
    <nav class="navbar-inverse" role="navigation">
        <div class="" style="padding-left:0;margin-left:0">
            <div class="navbar-header">
                <div id="menu-trigger"><span class="glyphicon glyphicon-align-justify"></span></div>
                <a href="/admin/index/index"><img src="/static/Admin/img/nt_logo.png" width="178px" height="50px"
                                          border="0"/></a>
            </div>
            <div class="collapse navbar-collapse navbar-right" id="top-menu">
                <ul class="nav navbar-nav">
                    <li class="dropdown"><a href="#" class="dropdown-toggle langshow" data-toggle="dropdown"><span>LANGUAGE </span>
                        <b
                                class="caret"></b> </a>
                        <ul class="dropdown-menu langul" style="padding:0;">
                            <li><a href="#" class="setLang langsctive" lang="zh" langval="zh-cn">{:lang('Chinese')}</a></li>
                            <li><a href="#" class="setLang" lang="en" langval="en-us">{:lang('English')}</a></li>
                            <li><a href="#" class="setLang" lang="pt" langval="pt-br">{:lang("Portuguese")}</a></li>
                        </ul>
                    </li>
                    <li class="dropdown"><a href="#" class="dropdown-toggle" data-toggle="dropdown"> {$Request.session.admin.nickname} <b
                            class="caret"></b> </a>
                        <ul class="dropdown-menu">

                            <li><a href="/admin/login/personalmeans" data-toggle="modal"
                                   data-target="#myinfo_editModal"> {:lang('personal_information')}</a></li>

                            <li><a href="/admin/login/editpass" data-toggle="modal"
                                   data-target="#repsw_editModal"> {:lang('change_password')}</a></li>

                            <li><a href="/Admin/login/logout">{:lang('leave_safely')}</a></li>
                        </ul>
                    </li>
                </ul>
            </div>

            <div class="navbar-collapse navbar-right" id="top-search" style="margin-top:8px">
                <button type="submit" class="btn btn-default btn-primary" id="btn-search"><span
                        class="glyphicon glyphicon-search"></span>search
                </button>
            </div>
        </div>
    </nav>
</div>
<div class="mLeft">
    {foreach $menu as $menukey=>$menuval}
    <div class="mTitle"><span class="glyphicon {$menuval['style']}"></span> {:lang($menuval.content)}</div>
    {notempty name="$menuval.child"}
    <ul class="nav nav-stacked">
        {foreach $menuval.child as $menukeys=>$menuvals}
        <li><a href="#" class="first-menu" data-navpid="{$menuvals.id}"><span
                class="glyphicon {$menuvals['style']}"></span> {:lang($menuvals.content)}</a>
            {notempty name="$menuvals.child"}
            <ul class="sub-menu nav nav-stacked">
                {foreach $menuvals.child as $menukeyss=>$menuvalss}
                <li><a href="{:url($menuvalss['control'] . '/' . $menuvalss['option'])}" data-navid="{$menuvalss.id}">{:lang($menuvalss.content)}</a>
                </li>
                {/foreach}
            </ul>
            {/notempty}
            {/foreach}
        </li>
    </ul>
    {/notempty}
    {/foreach}
</div>
<!-- 全局MODAL窗 -->
<!-- 员工资料 MODAL窗 -->
<div class="modal fade" id="myinfo_editModal" tabindex="-1" role="dialog" aria-labelledby="ntModalLabel"
     aria-hidden="true">
    <div class="modal-dialog modal-lg">
        <div class="modal-content" style="width:1000px">

        </div><!-- /.modal-content -->
    </div><!-- /.modal -->
</div>

<!-- 改密码 MODAL窗 -->

<div class="modal fade" id="repsw_editModal" tabindex="-1" role="dialog" aria-labelledby="ntModalLabel"
     aria-hidden="true">
    <div class="modal-dialog modal-lg">
        <div class="modal-content" style="width:1000px">

        </div><!-- /.modal-content -->
    </div><!-- /.modal -->
</div>
<span id="lang" style="display: none">{$Request.cookie.think_var}</span>
<script type="text/javascript">
    $("#repsw_editModal").on("hide.bs.modal", function () {
        $(this).removeData("bs.modal");
        $(".modal-content").children().remove();
        $(document).unbind('keydown')
    });
    $("#myinfo_editModal").on("hide.bs.modal", function () {
        $(this).removeData("bs.modal");
        $(".modal-content").children().remove();
        $(document).unbind('keydown')
    });
    $('.setLang').click(function () {
        $.ajax({
            url: '/admin/api/lang?lang_type=' + $(this).attr('lang'),
            type: 'post',
            success: function (data) {
                location.reload();
            }
        })
    });
    function getCookie(name) {
        var arr, reg = new RegExp("(^| )" + name + "=([^;]*)(;|$)");
        if (arr = document.cookie.match(reg))
            return unescape(arr[2]);
        else
            return null;
    }
    function setLang() {
        $('.langul .langsctive').removeClass('langsctive')
        var lang = getCookie('think_var')
        $('.langul li a').each(function () {
            if ($(this).attr('langval') == lang) {
                $(this).addClass('langsctive')
                $('.langshow span').html($(this).html())
            }
        })
        switch (lang){
            case 'zh-cn':
            langcon=zh
            break;
            case 'en-us':
            langcon=en
            break;
            case 'pt-br':
            langcon=pt
            break;
            default:
            langcon=zh
        }
    }
    setLang()
    $(document).on("show.bs.modal", ".modal", function(){
        $(this).draggable({
        });
        $(this).css("overflow", "hidden"); 
    });
    function change_mes_type(el,type){
        var classname
        switch(type){
            case 0:
            classname='alert alert-danger'
                break;
            case 1:
            classname='alert alert-success'
                break;
            case 2:
            classname='alert alert-warning'
                break;
            case 3:
            classname='alert alert-info'
                break;
        }
        $(el).attr('class',classname)
    }
</script>
<div class="silde">
